package com.zhengbing.tj.data.complexity;

/**
 * 时间复杂度Demo测试入口
 *
 * @author zhengbing
 * @date 2025-07-22
 */
public class ComplexityDemoMain {
    public static void main(String[] args) {
        int[] arr = new int[100];
        for (int i = 0; i < arr.length; i++) arr[i] = i;

        ConstantDemo c = new ConstantDemo();
        LinearDemo l = new LinearDemo();
        QuadraticDemo q = new QuadraticDemo();

        System.out.println("O(1) 示例: getFirst = " + c.getFirst(arr));
        System.out.println("O(n) 示例: sum = " + l.sum(arr));
        System.out.println("O(n^2) 示例: countPairs = " + q.countPairs(arr));
    }
} 